package com.huatek.authority.entity;

import com.huatek.base.entity.BaseEntity;
/**
 * 数据权限的实体类
 *
 * @author winner
 *
 */
public class EfwSourceEntity extends BaseEntity {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private String entityName;
	private String entityClass;
	private Integer sourceType;
	private String entityField;
	private String queryUrl;
	private String exceptParam;
	/***
	 * 实体别名.
	 * 可能有多个别名，比如多个视图等，使用的实体还是同一个.
	 * 每一个别名和具体的视图实体名是一样的，多个视图实体名
	 * 使用分号;隔开.
	 */
	private String entityAlias;
	/***
	 * 数据显示列名称.
	 */
	private String outputName;
	/***
	 * 数据显示列字段.
	 */
	private String outputField;
	public String getEntityName() {
		return entityName;
	}
	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}
	public String getEntityClass() {
		return entityClass;
	}
	public void setEntityClass(String entityClass) {
		this.entityClass = entityClass;
	}
	public Integer getSourceType() {
		return sourceType;
	}
	public void setSourceType(Integer sourceType) {
		this.sourceType = sourceType;
	}
	public String getEntityField() {
		return entityField;
	}
	public void setEntityField(String entityField) {
		this.entityField = entityField;
	}

	public String getDisplayMethod(){
		if(this.sourceType==1){
			return "displayEntity";
		}
		return "displayField";
	}
	public String getQueryUrl() {
		return queryUrl;
	}
	public void setQueryUrl(String queryUrl) {
		this.queryUrl = queryUrl;
	}
	public String getExceptParam() {
		return exceptParam;
	}
	public void setExceptParam(String exceptParam) {
		this.exceptParam = exceptParam;
	}
	public String getEntityAlias() {
		return entityAlias;
	}
	public void setEntityAlias(String entityAlias) {
		this.entityAlias = entityAlias;
	}
	public String getOutputName() {
		return outputName;
	}
	public void setOutputName(String outputName) {
		this.outputName = outputName;
	}
	public String getOutputField() {
		return outputField;
	}
	public void setOutputField(String outputField) {
		this.outputField = outputField;
	}

	/***
	 * 非持久化字段.
	 */
	private boolean isTreeEntity;
	public boolean isTreeEntity() {
		return isTreeEntity;
	}
	public void setTreeEntity(boolean isTreeEntity) {
		this.isTreeEntity = isTreeEntity;
	}

}
